<?php 

		$ch = curl_init(); 
		//$url="120.96.183.123";
		$url=$_POST['ip'];
		curl_setopt($ch, CURLOPT_URL, $url); 
		curl_setopt($ch, CURLOPT_HEADER, TRUE); 
		curl_setopt($ch, CURLOPT_NOBODY, TRUE); // remove body 
		curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); 
		$head = curl_exec($ch); 
		$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); 
		curl_close($ch); 
        if ($httpCode==200){
			echo "Connection Success";
		}
		else {
			echo "Connection Failed";
		}

?> 